package Main;

import java.io.DataInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

import Application.App;
import DataProcess.ProcessStream;
import InputPkg.*;

public class Main {
	
	
	public static void main(String[] avgs) throws FileNotFoundException{
		Scanner in = new Scanner(new File("AppConfig"));
		String mode = in.next().substring(5);
		int type = Integer.parseInt(in.next().substring(6));
		System.out.print(type);
		DataInputStream dataInput;
		DataInput di;
		if(type==1){
			di = new IntegerInput(dataInput);
			
		}
		else {
			di = new CharInput(dataInput);
		}
		Thread thread = new Thread(di);
		thread.start();
		App app = new App();
		
		ProcessStream procstream = new ProcessStream(app,di);
		Thread threadProcess = new Thread(procstream);
		threadProcess.start();
		//App app = new App();
		
		//app.NotifyApp("hello");
	}
	
	
}

